<template>
  <div ref="mychart" id="demoEchart">
  </div>
</template>

<script>
// 1. 引入echarts
import * as echarts from 'echarts';

export default {
  mounted() {
    let myEcharts = echarts.init(this.$refs.mychart);
    // 设置参数
    myEcharts.setOption({
      title: {
        text: "统计数据",
      },
      xAxis: {
        data: ["第一季度","第二季度","第三季度","第四季度"],
      },
      yAxis: {
        data: [],
      },
      series: {//系列
          name: "示例",
          type: "bar",
          data: [600,500,400,300],
      }
    });
  },
};
</script>

<style>
#demoEchart {
    width: 500px;
    height: 500px;
    border: 1px solid red;
}
</style>
